package com.ruoyi.electronicFence.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.config.DbInterfaceConfig;
import com.ruoyi.electronicFence.domain.A2StaticInfo;
import com.ruoyi.electronicFence.domain.vo.ReqVo;
import com.ruoyi.electronicFence.utils.HttpUtil;
import com.ruoyi.electronicFence.domain.StaticInfo;
import com.ruoyi.electronicFence.service.StaticInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【J_KY_R_FJJCJTB(AIS/ADS-B静态信息表)】的数据库操作Service实现
* @createDate 2025-02-14 17:56:06
*/
@Service
public class StaticInfoServiceImpl
    implements StaticInfoService {

//    @Autowired
//    private StaticInfoMapper staticInfoMapper;

    @Autowired
    private DbInterfaceConfig dbInterfaceConfig;

    @Override
    public A2StaticInfo selectByMmsiIcao(String mmsiIcao) {
//        QueryWrapper<StaticInfo> queryWrapper = new QueryWrapper<>();
//        queryWrapper.eq("mmsi_icao", mmsiIcao);
//        return staticInfoMapper.selectOne(queryWrapper);

        StringBuilder sb = new StringBuilder("");
        sb.append("select mbmc from J_KY_R_FJJCJTB where mbbm = ").append( "'" + mmsiIcao + "'");
        A2StaticInfo listBean = (A2StaticInfo) HttpUtil.getBean(dbInterfaceConfig, new ReqVo(sb.toString()), A2StaticInfo.class);
        return listBean;

    }
}




